<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=['a','b','c'];
        console.log(arr.indexOf('c'));

        if(arr.indexOf(30)> -1){
           console.log("找到了");
        }else{
            console.log("没找到")
        }

        ['尚学堂', '百战程序员', 'itbaizhan'].indexOf('尚学堂', 1) // -1

    </script>
</body>
</html>